import { BaseEntity } from '@cool-midway/core';
import { Column, Entity, Index } from 'typeorm';

/**
 * flock模块-用户信息
 */
@Entity('flock_user')
export class FlockUserEntity extends BaseEntity {
  @Index()
  // @Column({ comment: '用户ID' })
  // userId: number;

  // @Index()
  // @Column({ comment: '群ID' })
  // groupId: number;

  @Column({ comment: '用户名' })
  username: string;

  @Column({ comment: '头像', nullable: true })
  avatar: string;

  @Column({ comment: '状态 0-禁用 1-启用', default: 1 })
  status: number;

  @Column({ comment: '角色 0-普通成员 1-管理员 2-群主', default: 0, type: 'tinyint' })
  role: number;

  @Column({ comment: '备注', nullable: true })
  remark: string;

  @Column({ comment: '活跃度', type: 'tinyint',  })
  activity: number;

  @Column({ comment: '最后活动时间', type: 'datetime' })
  lastActivityTime: Date;
}
